package com.edu.controller.filter;
/*
 * @Author:princess
 * @Date 2023/11/9 11 09 10:45
 *
 */

import java.io.IOException;
import javax.servlet.*;
import javax.servlet.annotation.WebFilter;


@WebFilter("/*")
public class CharacterFilter implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        request.setCharacterEncoding("utf-8");
        chain.doFilter(request, response);
    }

    @Override
    public void destroy() {

    }

}
